home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / oobr / Makefile < prev    next >
Encoding:
Makefile  |  1995-08-29  |  9.8 KB  |  279 lines

  1. #
  2. # SUMMARY:      Build OO-Browser directories and distributions.
  3. #
  4. # AUTHOR:       Bob Weiner
  5. #
  6. # ORIG-DATE:     6-Oct-94 at 03:42:38
  7. # LAST-MOD:     29-Aug-95 at 10:43:41 by Bob Weiner
  8. #
  9. # Copyright (C) 1994-1995  Free Software Foundation, Inc.
  10. # See the file BR-COPY for license information.
  11. #
  12. # This file is part of the OO-Browser.
  13. #
  14. # DESCRIPTION:  
  15. #
  16. # USAGE:        Before doing your first make, edit the CONFIGURABLE SECTION
  17. #               in the "Makefile".  The only change you have to make is to
  18. #               set the EMACS variable to point to the Emacs executable that
  19. #               you want to use to byte-compile the OO-Browser Lisp files.
  20. #               Make this change now and save the file.
  21. #
  22. #               If you are running Emacs V18 or Epoch, you must first rebuild
  23. #               all byte-compiled Lisp files.  Use:
  24. #                    make all-elc
  25. #
  26. #               Then, whatever Emacs version you use, invoke:
  27. #                    make
  28. #
  29. #               Use these commands if you want to build graphical interfaces
  30. #               to the OO-Browser:
  31. #                    Build the X OO-Browser:        make xoobr
  32. #
  33. #                    If you want to rebuild the NEXTSTEP OO-Browser below the
  34. #                    "tree-nx" directory, you must use NeXT's ProjectBuilder.
  35. #
  36. #               Now the OO-Browser should be ready for use if you have
  37. #               followed the installation instructions in "BR-README".
  38. #
  39. #   -----------------
  40. #
  41. #               To force rebuilding of all .elc files, even ones that are not
  42. #               out of date:
  43. #                    make all-elc
  44. #
  45. #               To build the Info version of the OO-Browser:
  46. #                    make info
  47. #
  48. #               To build the Postscript version of the OO-Browser:
  49. #                    make ps
  50. #
  51. # DESCRIP-END.
  52.  
  53. ##########################################################################
  54. #                         CONFIGURABLE SECTION                           #
  55. ##########################################################################
  56.  
  57. # Binaries for various versions of Emacs.  Set 'EMACS' below to the one you
  58. # want to use to byte-compile Lisp files.
  59. EMACS19 = emacs19
  60. EMACS18 = emacs
  61. EPOCH = epoch
  62. INFODOCK = infodock.bin
  63. XEMACS = xemacs
  64.  
  65. # Emacs version used to byte-compile .el files into .elc's.
  66. EMACS = $(XEMACS)
  67.  
  68. # Where to install the Info version of the OO-Browser manual.
  69. infodir = ../info
  70. # Where to install the Texinfo version of the OO-Browser manual
  71. # along with its im/ directory of images.
  72. texidir = ../man
  73.  
  74. # Site-specific Emacs Lisp libraries to load before byte-compiling any files
  75. # from this package.  Typically the only reason to set this is to get Emacs
  76. # to include the directory of this package into its load-path variable, which
  77. # determines where it will find Lisp library files to load.
  78. #
  79. # InfoDock and XEmacs 19.12 or higher include this package and automatically
  80. # add its directory to load-path.  Under Emacs 19, if you add this directory
  81. # to load-path in your site-lisp/site-start.el file, then you need not change
  82. # this setting since site-start is automatically loaded whenever Emacs starts
  83. # up.  If, however, you set load-path in your personal ~/.emacs file, you
  84. # must add that to this setting.
  85. #
  86. # You must include the .el or .elc file suffix on each library name and each
  87. # must be preceded by the `-l ' command-line flag.  If the directory in which
  88. # the library is stored will not be in your Emacs load-path when Emacs
  89. # attempts to load the library, you must include the full pathname to the
  90. # library.  Here is an example setting.
  91. #
  92. # SITE_PRELOADS = -l ~/.emacs -l set-load-path.el
  93. #
  94. SITE_PRELOADS =
  95.  
  96. # Temp file to use to build .elc files.
  97. ELISP_TO_COMPILE = /tmp/elc-${USER}
  98.  
  99. # Shell used to process this Makefile.  Bourne shell syntax is required.
  100. SHELL = /bin/sh
  101.  
  102. # UNIX commands you may want to change for your particular system.
  103. CP = \cp -p
  104. DVIPS = \dvips
  105. ETAGS = etags
  106. INSTALL = install -c
  107. MAKE = make
  108. MAKEINFO = \makeinfo --fill-column 74 
  109. MKDIR = mkdir
  110. MV = \mv -f
  111. RM = \rm -f
  112. TAR = tar
  113.  
  114. # Directory in which to create new distributions of the OO-Browser.
  115. DIST_DIR = /tmp
  116.  
  117. ##########################################################################
  118. #                     NO CHANGES REQUIRED BELOW HERE                     #
  119. ##########################################################################
  120.  
  121. OOBR_VERSION = 2.9.8
  122.  
  123. MAN_DIR = man
  124.  
  125. # Libraries that must be pre-loaded before trying to byte-compile anything.
  126. PRELOADS = $(SITE_PRELOADS) -l ./br-start.el
  127.  
  128. # Compile in batch mode. Under Emacs 19 and XEmacs, load
  129. # site-lisp/site-start.el, which may set load-path.
  130. BATCHFLAGS = -batch
  131.  
  132. # Directories other than the current directory in which to find files.
  133. # This doesn't seem to work in all versions of make, so we also add hypb/
  134. # explicitly to those files which need it.
  135. VPATH = hypb
  136.  
  137. HYPB_EL   = hypb/h-skip-bytec.lsp hypb/hact.el hypb/hargs.el \
  138.         hypb/hhist.el hypb/hmouse-drv.el \
  139.         hypb/hmouse-key.el hypb/hmous-info.el \
  140.         hypb/hmouse-reg.el hypb/hmouse-sh.el \
  141.         hypb/hpath.el hypb/hui-mouse.el \
  142.         hypb/hui-window.el hypb/hvar.el \
  143.         hypb/hversion.el hypb/hypb.el hypb/set.el
  144.  
  145. HYPB_ELC  = hypb/hact.elc hypb/hargs.elc \
  146.         hypb/hhist.elc hypb/hmouse-drv.elc \
  147.         hypb/hmouse-key.elc hypb/hmous-info.elc \
  148.         hypb/hmouse-reg.elc hypb/hmouse-sh.elc \
  149.         hypb/hpath.elc hypb/hui-mouse.elc \
  150.         hypb/hui-window.elc hypb/hvar.elc \
  151.         hypb/hversion.elc hypb/hypb.elc hypb/set.elc
  152.  
  153. # Files from Hyperbole necessary for OO-Browser mouse support.
  154. HYPERBOLE = $(HYPB_EL) $(HYPB_ELC)
  155.  
  156. EL_COMPILE  = br-c-ft.el br-c++-ft.el br-c++.el br-clos-ft.el \
  157.           br-clos.el br-compl.el \
  158.               br-eif-ft.el br-eif.el br-env.el br-ftr.el br-info.el \
  159.               br-init.el br-java.el br-java-ft.el \
  160.           br-lib.el br-menu.el br-objc-ft.el \
  161.               br-objc.el br-site.el br-vers.el \
  162.           br-smt.el br-start.el br-tree.el br.el c++-browse.el \
  163.           clos-brows.el eif-browse.el eif-calls.el eif-ise-er.el \
  164.           hasht.el hmouse-br.el info-brows.el java-brows.el \
  165.           objc-brows.el smt-browse.el
  166.  
  167. ELC_COMPILE = br-c-ft.elc br-c++-ft.elc br-c++.elc br-clos-ft.elc \
  168.           br-clos.elc br-compl.elc \
  169.               br-eif-ft.elc br-eif.elc br-env.elc br-ftr.elc br-info.elc \
  170.               br-init.elc br-java.elc br-java-ft.elc \
  171.           br-lib.elc br-menu.elc br-objc-ft.elc \
  172.               br-objc.elc br-site.elc br-vers.elc \
  173.           br-smt.elc br-start.elc br-tree.elc br.elc c++-browse.elc \
  174.           clos-brows.elc eif-browse.elc eif-calls.elc eif-ise-er.elc \
  175.           hasht.elc hmouse-br.elc info-brows.elc java-brows.elc \
  176.           objc-brows.elc smt-browse.elc
  177.  
  178. EL_TAGS = $(EL_COMPILE)
  179.  
  180. .SUFFIXES:            # Delete the default suffixes
  181. .SUFFIXES: .el .elc   # Define the list of file suffixes to match to rules
  182.  
  183. # Build the OO-Browser for use in current directory.
  184. all: elc
  185.  
  186. doc: info ps
  187.  
  188. xoobr:
  189.     cd tree-x; make
  190.  
  191.  
  192. install: xoobr
  193.     # Install the X OO-Browser in its executable directory.
  194.     cd tree-x; make install
  195.     cd $(MAN_DIR); $(INSTALL) oo-browser.info* $(infodir); \
  196.       $(INSTALL) oo-browser.texi $(texidir); \
  197.       $(INSTALL) im $(texidir)
  198.  
  199. # Record any .el files that need to be compiled.
  200. .el.elc:
  201.     @ echo $< >> $(ELISP_TO_COMPILE)
  202.  
  203. # Compile all recorded .el files.
  204. elc: elc-init $(ELC_COMPILE) $(HYPB_ELC)
  205.     @- \test ! -f $(ELISP_TO_COMPILE) \
  206.             || (echo "These files will be compiled: " \
  207.                  && echo "`cat $(ELISP_TO_COMPILE)`" \
  208.                  && $(EMACS) $(BATCHFLAGS) $(PRELOADS) \
  209.                        -f batch-byte-compile `cat $(ELISP_TO_COMPILE)`)
  210.     @ $(RM) $(ELISP_TO_COMPILE)
  211.  
  212. elc-init:
  213.     @ $(RM) $(ELISP_TO_COMPILE)
  214.  
  215. # Remove and then rebuild all byte-compiled .elc files for V19 Emacs, even
  216. # those .elc files which do not yet exist.
  217. all-elc:
  218.     $(RM) *.elc
  219.     $(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile $(EL_COMPILE)
  220.  
  221. # This target is used for background building of OO-Browser Environments.
  222. # Don't change the name of the target since it is used in "br-env.el".
  223. # Don't try to use this target manually unless you first set the following 2
  224. # environment variables:
  225. #    OOBR_DIR = full pathname of the directory where the OO-Browser lives
  226. #    OOBR_ENV = full pathname of the Environment specification to build
  227. oobr-env:
  228.     cd $(OOBR_DIR); $(EMACS) $(BATCHFLAGS) $(PRELOADS) ${OOBR_ENV} -f br-env-batch-build
  229.  
  230. dvi: $(MAN_DIR)/oo-browser.dvi
  231.  
  232. info: $(MAN_DIR)/oo-browser.info
  233.  
  234. ps: $(MAN_DIR)/oo-browser.ps
  235.  
  236. $(MAN_DIR)/oo-browser.dvi: $(MAN_DIR)/oo-browser.info
  237.     cd $(MAN_DIR); tex oo-browser.texi; texindex oo-browser.??; tex oo-browser.texi
  238.  
  239. $(MAN_DIR)/oo-browser.info: $(MAN_DIR)/oo-browser.texi
  240.     cd $(MAN_DIR); $(MAKEINFO) oo-browser.texi
  241.  
  242. $(MAN_DIR)/oo-browser.ps: $(MAN_DIR)/oo-browser.texi
  243.     make $(MAN_DIR)/oo-browser.dvi
  244.     -$(RM) $(MAN_DIR)/oo-browser.ps
  245.     cd $(MAN_DIR); $(DVIPS) -o oo-browser.ps oo-browser.dvi
  246.  
  247. tags: $(EL_TAGS)
  248.     $(ETAGS) $(EL_TAGS) tree-x/*.[ch] tree-nx/*.[mh]
  249.  
  250. hypb-tags: $(EL_TAGS)
  251.     cd $(DIST_DIR)/oobr; $(ETAGS) $(EL_TAGS) $(HYPB_EL) tree-x/*.[ch] tree-nx/*.[mh]
  252.  
  253. clean:  distclean
  254.     $(RM) *.elc
  255.  
  256. version:
  257.     fgrep $(OOBR_VERSION) BR-RELEASE br-vers.el man/oo-browser.texi
  258.     echo ""
  259.  
  260. dist: version elc info
  261.     echo "Ensure version # in br-vers.el and man/oo-browser.texi is up to date."
  262.     $(RM) -r $(DIST_DIR)/oobr
  263.     cd ..; $(TAR) clf $(DIST_DIR)/br.tar oobr
  264.     cd $(DIST_DIR); $(TAR) xf br.tar
  265.     cd $(DIST_DIR)/oobr; $(RM) -r hypb man/im; make distclean; \
  266.       mkdir hypb man/im; chmod 755 hypb man/im; \
  267.       $(CP) /usr/local/infodock/info-local/im/oobr-* man/im
  268.     $(CP) $(HYPERBOLE) $(DIST_DIR)/oobr/hypb
  269. # This ver setup won't work under SunOS for some reason.
  270. #      ver="`head -3 oobr/br-vers.el | tail -1 | sed -e 's/.*|//'`"
  271.     cd $(DIST_DIR); $(RM) br.tar; \
  272.       $(TAR) --gzip -clf oobr-$(OOBR_VERSION).tar.gz oobr
  273.  
  274. distclean:
  275.     -$(RM) TAGS core .place* .*~ *~ *\# *.orig *.rej
  276.     -cd tree-x; $(RM) .*~ *~ *\# *.orig *.rej *.o xoobr
  277.     -cd tree-nx; $(RM) -r .*~ *~ *\# *.orig *.rej obj* TreeView.app
  278.     -cd $(MAN_DIR); $(RM) oo-browser.?? oo-browser.dvi .*~ *~ *\# *.orig *.rej
  279.